export const searchConfig = ({
  DICTDATA,
  classBig,
}: {
  DICTDATA: IDICTDATAType
  classBig: IOptionItem[]
}): IItemArray[] => {
  return [
    {
      name: 'productYear',
      label: '年份',
      type: 'FixedDatePicker',
      placeholder: '请选择年份',
      config: {
        picker: 'year',
        format: 'YYYY',
        customFormat: 'YYYY',
      },
    },
    {
      name: 'seasonCode',
      label: '订单季节',
      type: 'Select',
      option: DICTDATA.order_season,
      placeholder: '请选择订单季节',
      config: {
        optionFilterProp: 'label',
      },
    },
    {
      label: '大类',
      name: 'largeClassId',
      type: 'Select',
      option: classBig,
      config: {
        showSearch: true,
        optionFilterProp: 'label',
      },
    },
    {
      name: 'channel',
      label: '渠道',
      type: 'Select',
      option: [
        { label: '直营', value: 1 },
        { label: '加盟', value: 2 },
      ],
      placeholder: '请选择渠道',
      config: {
        showSearch: true,
        filterOption: true,
        optionFilterProp: 'label',
      },
    },
  ]
}

export const useFormExport = (): IItemArray[] => {
  return [
    {
      label: '导出数据维度',
      name: 'exportDataTypeList',
      type: 'Checkbox',
      option: [
        { label: '色', value: 'exportSkc' },
        { label: '尺码', value: 'exportSku' },
      ],
    },
  ]
}
